<!DOCTYPE html>
<@compress single_line=isCompress>
<html lang="en">
<head>
    <title>${platform} - 用户管理</title>
    <#include "/pager/common/quote.ftl" />
</head>
<body>
<#include "/pager/biz-logic/include/top.ftl" />

<div id="page-wrapper"><!--BEGIN PAGE HEADER & BREADCRUMB-->
    <div class="page-header-breadcrumb hide">
        <div class="page-heading hidden-xs"><h1 class="page-title">BLog Dashboard</h1></div>
        <ol class="breadcrumb page-breadcrumb">
            <li><i class="fa fa-home"></i>&nbsp;<a href="index.html">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;
            </li>
            <li><a href="#">系统管理</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
            <li class="active">用户管理</li>
        </ol>
    </div>
    <!--END PAGE HEADER & BREADCRUMB--><!--BEGIN CONTENT-->
    <div class="page-content">
        <div id="tab-general">
            <div class="row">
                <div class="col-lg-12">
                    <div class="portlet">
                        <div class="portlet-header">
                            <div class="caption">用户管理</div>
                        </div>
                        <div class="portlet-body">
                            <div class="table-tools">
                                <form onsubmit="return false;" id="searchForm" class="search-form form-inline">
                                    <div class="row" style="margin-left:2px;margin-right:2px;margin-top:8px">
                                        <select name="roleId" class="form-control" onchange="reload()">
                                            <option value="">请选择角色</option>
                                            <#if roles?? && roles?size gt 0>
                                                <#list roles as r>
                                                    <option value="${r.roleId}">${r.roleName}</option>
                                                </#list>
                                            </#if>
                                        </select>
                                        <select name="status" class="form-control" onchange="reload()">
                                            <option value="">请选择状态</option>
                                            <option value="1" selected="selected">启用</option>
                                            <option value="0">停用</option>
                                        </select>
                                        <input type="text" name="username" class="form-control" placeholder="输入用户名"/>
                                        <button id="searchButton" type="submit" class="btn btn-primary mrs"><i
                                                class="fa fa-search"></i> 查询
                                        </button>

                                        <div class="form-inline pull-right">
                                            <button id="newUser" type="button" data-target="#modal-prompt"
                                                    data-toggle="modal" class="btn btn-primary mrs"><i
                                                    class="fa fa-plus"></i> 新增
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="table-responsive mtl">
                                <table id="datatable" cellpadding="0" cellspacing="0" border="0"
                                       class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <th>用户名</th>
                                    <th>姓名</th>
                                    <th>角色</th>
                                    <th>电话</th>
                                    <th>QQ</th>
                                    <th>Email</th>
                                    <th>登录次数</th>
                                    <th>最后登录时间</th>
                                    <th>操作</th>
                                    </thead>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="modal fade" id="userEditDialog" tabindex="-1" role="dialog"
                         aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog" style="width: 600px;">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal"
                                            aria-hidden="true">×
                                    </button>
                                    <h4 class="modal-title" id="userEditLabel">编辑用户</h4>
                                </div>
                                <div class="modal-body">
                                    <form id="userEditForm" class="form-horizontal" method="post" onsubmit="return false;" style="width: 500px;">
                                        <div class="form-group">
                                            <label for="username" class="col-sm-3 control-label">用户名：<span
                                                    style="color: #ff0000">*</span></label>

                                            <div class="col-sm-8">
                                                <input type="text" class="form-control" name="username" id="username"
                                                       maxlength="30"/>
                                                <span class="sr-only"><input type="hidden" name="userId"
                                                                             id="userId"/></span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">姓 名：<span
                                                    style="color: #ff0000">*</span></label>
                                            <div class="col-sm-8">
                                                <input type="text" class="form-control" name="nick" id="nick"
                                                       maxlength="30"/>
                                            </div>
                                        </div>

                                       <div class="form-group">
                                            <label for="qq" class="col-sm-3 control-label">QQ号：</label>

                                            <div class="col-sm-8">
                                                <input type="text" class="form-control" name="qq" id="qq"
                                                       maxlength="50"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="phone" class="col-sm-3 control-label">手机号：</label>

                                            <div class="col-sm-8">
                                                <input type="text" class="form-control" name="phone" id="phone"
                                                       maxlength="50"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="email" class="col-sm-3 control-label">邮 箱：</label>
                                           	<input type="hidden" name="originalEmail" id="originalEmail"/>
                                            <div class="col-sm-8">
                                                <input type="text" class="form-control" name="email" id="email"
                                                       maxlength="50"/>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">状 态：</label>

                                            <div class="col-sm-8">
                                                <label class="radio-inline">
                                                    <input type="radio" name="status" value="1" checked="checked"/> 正常
                                                </label>
                                                <label class="radio-inline">
                                                    <input type="radio" name="status" value="0"/> 停用
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="roleId" class="col-sm-3 control-label">角 色：<span
                                                    style="color: #ff0000">*</span></label>

                                            <div class="col-sm-8">
                                                <select class="form-control" name="roleId" id="roleId">
                                                    <option value="">==请选择==</option>
                                                    <#if roles?? && roles?size gt 0>
                                                        <#list roles as r>
                                                            <option value="${r.roleId}">${r.roleName}</option>
                                                        </#list>
                                                    </#if>
                                                </select>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" id="closeBtn" data-dismiss="modal">
                                        关闭
                                    </button>
                                    <button type="button" class="btn btn-primary" id="saveBtn">
                                        保存
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "/pager/biz-logic/include/bot.ftl" />
</@compress>
